import request from '@/utils/request'

// 查询试题管理列表
export function listQuestion(query) {
  return request({
    url: '/paper/question/list',
    method: 'get',
    params: query
  })
}

// 查询试题管理详细
export function getQuestion(id) {
  return request({
    url: '/paper/question/' + id,
    method: 'get'
  })
}

// 编辑选择题
export function editChoice(data) {
  return request({
    url: '/paper/question/editChoice',
    method: 'post',
    data: data
  })
}

// 编辑主观题
export function editAnswer(data) {
  return request({
    url: '/paper/question/editAnswer',
    method: 'post',
    data: data
  })
}

// 编辑B1题
export function editB1(data) {
  return request({
    url: '/paper/question/editB1',
    method: 'post',
    data: data
  })
}

// 编辑A3A4题
export function editA3A4(data) {
  return request({
    url: '/paper/question/editA3A4',
    method: 'post',
    data: data
  })
}

// 编辑判断题
export function editTF(data) {
  return request({
    url: '/paper/question/editTF',
    method: 'post',
    data: data
  })
}

// 修改试题管理
export function updateQuestion(data) {
  return request({
    url: '/paper/question',
    method: 'put',
    data: data
  })
}

// 删除试题管理
export function delQuestion(id) {
  return request({
    url: '/paper/question/' + id,
    method: 'delete'
  })
}


// 查询题库下拉树结构
export function repoTreeSelect() {
  return request({
    url: '/paper/question/repoTree',
    method: 'get'
  })
}

// 试题导入进度监测
export function importMonitor(uuid) {
  return request({
    url: '/paper/question/importMonitor/'+uuid,
    method: 'get'
  })
}